<template>
	<view class="hun" style="background-color: #EEEEEE;position: relative;height: 100%;">
		<view class="inv-h-w">
			<view :class="['inv-h',Inv==0?'inv-h-se':'']" @click="unsubmit">详情</view>
			<view :class="['inv-h',Inv==1?'inv-h-se':'']" @click="submit">处理</view>
		</view>



		<view class="" style="margin-top: 100upx;position: absolute;width: 100%;">
			<view class="formPage" v-if="Inv==0">
				<form>
					<view class="formPage-titel">
						<view>
							基本信息
						</view>
						<!-- <image v-if="basic==1" @click="downUp(1)" style="width:7%;height: 60%;"
							src="@/static/chevron-down.png" alt />
						<image v-if="basic==2" @click="downUp(2)" style="width:7%;height: 60%;"
							src="@/static/chevron-up.png" alt /> -->
					</view>

					<fromItem v-if="basic==1" title="下发指令单位" flex="right" nameColor="#989898" projectName="#343434"
						:data="totalData.fIssueunit"></fromItem>

					<fromItem v-if="basic==1" title="单位类型" :data="totalData.fUnittype" flex="right" nameColor="#989898"
						projectName="#343434">
					</fromItem>

					<fromItem v-if="basic==1" title="开始检查日期" :data="totalData.fStartcheckdates" flex="right"
						nameColor="#989898" projectName="#343434">
					</fromItem>

					<fromItem v-if="basic==1" title="截止检查日期" flex="right" nameColor="#989898" projectName="#343434"
						:data="totalData.fEndcheckdates">
					</fromItem>
					<fromItem v-if="basic==1" title="受检单位" :data="totalData.fCheckunit" flex="right" nameColor="#989898"
						projectName="#343434">
					</fromItem>
					<fromItem v-if="basic==1" title="受检项目" :data="totalData.fCheckproject" flex="right"
						nameColor="#989898" projectName="#343434">
					</fromItem>

					<fromItem v-if="basic==1" title="工作指令编号" :data="totalData.fOrdernumber" flex="right"
						nameColor="#989898" projectName="#343434">
					</fromItem>
					<fromItem v-if="basic==1" title="存在问题概述" :data="totalData.fProblemdescription" flex="right"
						nameColor="#989898" projectName="#343434">
					</fromItem>
					<fromItem v-if="basic==1" title="整改措施及要求" :data="totalData.fChangerequirements" flex="right"
						nameColor="#989898" projectName="#343434">
					</fromItem>
					<fromItem v-if="basic==1" title="要求整改期限" :data="totalData.fRequesttermdates" flex="right"
						nameColor="#989898" projectName="#343434">
					</fromItem>
					<fromItem v-if="basic==1" title="检查部门" :data="totalData.fCheckdepartment" flex="right"
						nameColor="#989898" projectName="#343434">
					</fromItem>
					<fromItem v-if="basic==1" title="检查人员" :data="totalData.fCheckinspectors" flex="right"
						nameColor="#989898" projectName="#343434">
					</fromItem>
					<fromItem v-if="basic==1" title="指定签收人" :data="totalData.fSubsignname1" flex="right"
						nameColor="#989898" projectName="#343434">
					</fromItem>
					<fromItem v-if="basic==1" title="抄送人" :data="totalData.fCcpeople" flex="right" nameColor="#989898"
						projectName="#343434">
					</fromItem>
					<fromItem v-if="basic==1" title="填报人" :data="totalData.fReportname" flex="right" nameColor="#989898"
						projectName="#343434">
					</fromItem>
					<fromItem v-if="basic==1" title="填报日期" :data="totalData.fReportdates" flex="right"
						nameColor="#989898" projectName="#343434">
					</fromItem>
					<fromItem v-if="basic==1" title="资料附件" flex="left" nameColor="#989898" projectName="#343434">
					</fromItem>
					<view class="fileList" v-if="basic==1">
						<div class="box" v-if="fileList.length !== 0">
							<div class="file" style v-for="(item, index) in fileList" :key="index"
								@click="pdfPage(item.name, item.url)">
								<image src="@/static/organization.png">
								</image>
								<span class="text" style>{{ item.name }}</span>
							</div>
						</div>
					</view>

					<view class="cu-form-group" style="margin-bottom: 50upx;">
					</view>

					<div class="wrapper" v-if="appliance==1">

						<div class="list">
							<text class="text" @click="clickNum(0)">保存</text>
							<text class="text" @click="clickNum(1)">提交</text>

						</div>
					</div>
				</form>



			</view>

			<view class="formPage" v-if="Inv==1">
				<form>

					<view style="width: 100%;">
						<view class="formPage-titel">
							<view>
								受检单位签收
							</view>
							<image v-if="close==1" @click="downUpClose(1)" style="width:7%;height: 60%;"
								src="@/static/chevron-down.png" alt />
							<image v-if="close==2" @click="downUpClose(2)" style="width:7%;height: 60%;"
								src="@/static/chevron-up.png" alt />
						</view>
						<fromItem v-if="close==1" title="签收单位" :data="totalData.fSignunit1" flex="right"
							nameColor="#989898" projectName="#343434">
						</fromItem>
						<fromItem v-if="close==1" type="textarea" title="签收说明" :data="totalData.fSigndescription1"
							flex="right" nameColor="#989898" projectName="#343434">
						</fromItem>
						<fromItem v-if="close==1" title="签收人" :data="totalData.fSignname1" flex="right"
							nameColor="#989898" projectName="#343434">
						</fromItem>
						<fromItem v-if="close==1" title="签收日期" :data="totalData.fSigndate1s" flex="right"
							nameColor="#989898" projectName="#343434">
						</fromItem>

						<view class="formPage-titel">
							<view>
								复查情况
							</view>
							<image v-if="auditA==1" @click="downUpAuditA(1)" style="width:7%;height: 60%;"
								src="@/static/chevron-down.png" alt />
							<image v-if="auditA==2" @click="downUpAuditA(2)" style="width:7%;height: 60%;"
								src="@/static/chevron-up.png" alt />
						</view>

						<cLabel  :flagNum="flagNum" v-if="auditA==1" title='复查结果' :dataText='totalData.fRecheckresult1'
							v-model='totalData.fRecheckresult1' :must="must" :selectList="fRecheckresultList"
							mode='selector2' />
						<cLabel v-if="auditA==1" title='复查文件编号' v-model='totalData.fFilenumber1' :must="must"
							placeholder="有编号则填，无编号录入'/' " :dataText='totalData.fFilenumber1' rightIcon='' mode='text' />
						<cLabel v-if="auditA==1" title='复查情况说明' v-model='totalData.fRecheckdescription1' must="no"
							:dataText='totalData.fRecheckdescription1' rightIcon='' mode='textarea' />
						<cLabel v-if="auditA==1" title='复查人' v-model='totalData.fRecheckname1' :must="must"
							:disabled="true" :dataText='totalData.fRecheckname1' rightIcon='' mode='text' />

						<cLabel v-if="auditA==1" title='复查完成时间' over="calc(5em + 15px)"
							:dataText='totalData.fRecheckdate1s' :must="must" v-model='totalData.fRecheckdate1s'
							mode='date1' :flagNum="flagNum" />
						<view v-if="auditA==1" class="cu-bar bg-white" style="border-top:1px #ccc solid ;">
							<view class="action">
								<image src="@/static/Scope.png" mode=""
									style="width: 30upx;height: 30upx;vertical-align: middle;">
									复查相关资料
							</view>
							<view class="action">
								{{fRecheckfileList.length}}/{{count}}
							</view>
						</view>

						<view v-if="auditA==1" class="cu-form-group">
							<view class="grid col-4 grid-square flex-sub">
								<view v-if="fRecheckfileList.length<count">
									<lsj-upload ref="lsjUpload" childId="upload" :width="heights" :height="heights"
										:option="option" :size="size" :debug="debug" :instantly="instantly"
										@progress="onprogress" @change="onChange" :count='count'>
										<view class="solids" style="width: 156rpx;height: 156rpx;">
											<text class='cuIcon-add'></text>
										</view>
										<!-- <view class="btn" :style="{height: height}">选择附件</view> -->
									</lsj-upload>
								</view>


								<view class="bg-img" v-for="(item,index) in fRecheckfileList" :key="index"
									:data-url="item.url" @tap="pdfPage(item.name, item.url)">
									<image src="@/static/organization.png" mode="aspectFill"></image>
									<view class="cu-tag bg-red" @tap.stop="DelFile($event,item.fId,index)">
										<text class='cuIcon-close'></text>
									</view>
									<view class="fileText"> {{item.name}}</view>
								</view>

							</view>
						</view>

					</view>

					<view class="cu-form-group" style="margin-bottom: 100upx;">
					</view>
					<div class="wrapper" v-if="appliance==1">
						<div class="list">
							<text class="text" @click="clickNum(0)">保存</text>
							<text class="text" @click="clickNum(1)">提交</text>
						</div>
					</div>
				</form>
			</view>

			<loading :shadeShow="shadeShow" :shadeClick="false" :backgroundColor="backgroundColor" :width="width"
				:height="height" ref="loading" :custom="false" :type="1" @callback="callback()">
			</loading>
		</view>


	</view>
</template>
<script src="./index.js">
</script>
<style scoped lang="less">
	@import './index.less';
</style>
